package com.huarui.task.dao;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.dao.impl.BaseDaoImpl;

import com.huarui.task.model.TaskOwner;

public class TaskOwnerDao  extends BaseDaoImpl {

	public boolean takeOverPurchaseOrder(Map<String, Object> paramsMap) {
		return 1 == this.getSqlMapClientTemplate().update(super.namespace + ".takeOverPurchaseOrder", paramsMap);
	}
	
	@SuppressWarnings("unchecked")
	public List<TaskOwner> getTaskOwnerListByTaskId(Map<String, Object> paramsMap) {
		return this.getSqlMapClientTemplate().queryForList(super.namespace + ".getTaskOwnerListByTaskId", paramsMap);
	}
	
//	public boolean updateTaskOwner(Map<String, Object> paramsMap) {
//		return 1 == this.getSqlMapClientTemplate().update(super.namespace + ".update", paramsMap);
//	}
	
	public TaskOwner getTaskOwnerByTaskIdAndOwnerId(Map<String, Object> paramsMap) {
		return (TaskOwner) this.getSqlMapClientTemplate().queryForObject(super.namespace + ".getTaskOwnerByTaskIdAndOwnerId", paramsMap);
	}
}
